#include <stdio.h>
int main()
{

    int a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    int *start = a;
    int *end = a + 10;
    while(start < end)
    {
        int tmp = *start;
        *start = *(end-1);//这里是end-1而不是end，因为数组的最后一个元素的地址是end-1
        *(end-1) = tmp;
        start++;
        end--;
    }
    for(int i = 0; i < 10; i++)
    {
        printf("%d ", a[i]);
    }
    return 0;
}
